package com.security.door.core.tk.mapper;

import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.UpdateProvider;

import java.util.List;

@tk.mybatis.mapper.annotation.RegisterMapper
public interface MySqlMapper<T> {

    /**
     * 批量更新，为空的字段不更新
     */
    @UpdateProvider(type = MySpecialProvider.class, method = "dynamicSQL")
    int updateByIdBatch(List<T> recordList);

    /**
     * 批量插入，为空的字段不插入
     */
    @InsertProvider(type = MySpecialProvider.class, method = "dynamicSQL")
    int insertList(List<T> recordList);
}
